/**
 * 第二个示例，完整展现4个角色
 * 
 * 角色：
 * 中介者接口：Mediator
 * 具体中介者接口：ConcreteMediator
 * 同事接口：Colleague
 * 具体同事类：ConcreteColleagueA、ConcreteColleagueB
 */
public class SimpleMain {
    public static void main(String[] args) {
        Mediator mediator = new ConcreteMediator();
        Colleague colleagueA = new ConcreteColleagueA(mediator,"A");
        Colleague colleagueB = new ConcreteColleagueB(mediator,"B");

        colleagueA.send("B","hi,B!");
        colleagueB.send("A","hello,A!");
    }
}
